﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

#if NETFX_CORE
using Windows.ApplicationModel.Resources;

#endif

namespace StyleMVVM.Validation.Impl.Fluent
{
	public class FluentValue<T> : IFluentValueProvider<T>
	{
		private readonly object compareObject;

		public FluentValue(object compareObject)
		{
			this.compareObject = compareObject;
		}

		public string MessageString
		{
			get { return compareObject.ToString(); }
		}

		public Expression GenerateExpression(IFluentExpressionProvider propertyExpressionProvider)
		{
			Expression constantExpression = Expression.Constant(compareObject);

			return constantExpression;
		}

		public string GenerateDisplayString(ResourceLoader loader)
		{
			return compareObject.ToString();
		}
	}
}